home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
VISUALBA
/
INSPRO.ZIP
/
INSTLIB.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-01-02
|
15KB
|
297 lines
Library Install;
{$D INSTLIB.DLL - ⌐ Copyright 1992 Robert Salesas, All Rights Reserved.}
{$I-}
{$M 1024,1024
{
********************************************************************
* EDI Install Pro for Windows *
* Demo custom library *
********************************************************************
* Copyright 1992 Robert Salesas, All Rights Reserved *
********************************************************************
* Version: 1.00 Author: Robert Salesas *
* Date: 13-Apr-1992 Changes: Original *
* *
********************************************************************
}
Uses WinTypes, WinProcs;
Const { Procedure call codes }
icm_Setup = 10; { Called before first dialog box. }
icm_Setup2 = 20; { Called after first dialog box. }
icm_Components = 30; { Called before components dialog box. }
icm_Components2 = 40; { Called after components dialog box. }
icm_StartCopy = 50; { Called before files start getting copied. }
icm_FileCopy = 60; { Called for each file that needs to get copied. }
icm_EndCopy = 70; { Called all files have been copied. }
icm_PMGroup = 80; { Called before the PM group dialog box. }
icm_ExtraStuff = 90; { Called once the installation is completed. }
icm_EndDlgGood = 100; { Called before the last dialog box. }
icm_EndDlgBad = 110; { Called before the last dialog box. }
icm_EndInstall = 120; { Called before program terminates. }
Const
ir_Continue = 0; { Continue with normal execution. }
ir_SkipSection = 1; { Skip this section. }
ir_AbortInstall = -1; { Abort the installation with proper messages. }
{
Declaration:
~~~~~~~~~~~~
Function InstallDLLProc(Instance : THandle; Code : Integer; Src, Dest : PChar;
Var Components : LongInt) : Integer; Export;
Description:
~~~~~~~~~~~~
Allows custom modification of the installation. You may use or change the values
passed to your function. By creating routines to handle special parts of your
installation (such as extra setup information or copying specially encoded files),
you can completely customize EDI Install Pro without having to write your own
installer. There's very little (if anything) that can't be handled through a
custom DLL. Since the DLL can be written in almost any language, you don't have
to learn to program in some strange "installer" language.
To add a DLL to an installation script simply add the following under the [APPLICATION]
section, if it's not compressed:
[APPLICATION]
Install DLL=INSTLIB.DLL N
and if it is:
[APPLICATION]
Install DLL=INSTLIB.DL$ Y
Parameters:
~~~~~~~~~~~
Instance The instance handle of the install application. You can use it to access
resources stored in the EXE. If you need to create new resources, add them
to the DLL, not INSTALL.EXE.
Code Specifies when the procedure is getting called. Each code allows you to
perform certain actions. Note that you don't have to handle every code, only
the ones you want. Simply return ir_Continue for any code you don't want to
handle.
icm_Setup Src and Dest contain the default values for the
directories. Components are all turned on.
You may modify the default values of Src and Dest.
Override (return ir_SkipSection) this section if you want
to include your own "Get destination" dialog box.
icm_Setup2 Dest contains the value entered by the user. Src and
Components are unchanged.
You may modify the value of Dest that the user entered.
If you require extra setup information from the user, this
is the place to get it. Pop up whatever dialogs you need.
You can store the information in the DLL, since it will
always be accessed by only one instance.
icm_Components Src, Dest and Components are unchanged.
Override this section if you want to include your own
"Select Components" dialog box, or if you want to "force"
component selection. For example you might want to use a
simple dialog box with radio buttons instead of the listbox.
icm_Components2 Components contains the value selected by the user.
Src and Dest are unchanged.
You may modify the value of Components that the user
entered. If you require extra component or setup
information from the user, this is the place to get it.
Pop up whatever dialogs you need. You can store the
information in the DLL, since it will always be
accessed by only one instance.
icm_StartCopy Src, Dest and Components are unchanged.
This call is made before any files get copied. Use this
call for any setup procedure you need if you use
icm_FileCopy. For example, if you wanted to display
small messages on a separate as files get copied, you
would open the window in this call.
icm_FileCopy Src and Dest contain the SOURCE FILE PATH and the
DESTINATION FILE PATH. This differs from all the other
calls. Note the file name of Src and Dest might not
be the same. For example, a compressed file could be
named FILE.EX$ as the source, and FILE.EXE as the
destination. Components are unchanged.
This call is made every time a file is about to be
copied. Override this section if you want to display
messages in a window created by icm_startCopy or if you
want to use your own copying code. For example, if you
encode your main .EXE, but not the rest of the files,
you can check to see if the current file is encoded, and
if it is, you decode it (and copy) and return
ir_SkipSection, and if it isn't encoded you ignore it and
return ir_Continue. You can even do this: decode the
source file to a temporary file (in Windows temp directory),
change Src to reflect this new source file, and return
ir_Continue. EDI Install will then copy (decompressing if
needed) the file! So you c